package com.xmy.cultivate.service;

import com.xmy.cultivate.entity.Permission;
import com.baomidou.mybatisplus.extension.service.IService;

import java.util.List;
import java.util.Set;

/**
 * <p>
 *  服务类
 * </p>
 *
 * @author baomidou
 * @since 2022-08-07
 */
public interface IPermissionService extends IService<Permission> {

    public abstract boolean saveTo(Permission permission);

    public abstract boolean updateTo(Permission permission);

    public abstract boolean deleteById(Long id);

    /**
     *
     * @param adminId adminId
     * @param type 权限类型 1为菜单 2为功能 3为APItype
     * @return
     */
    public List<String> getPermissionCodeList(Long adminId, Integer type);

    List<String> getPermissionCodeAll(Integer type);

    Set<String> getPermissoinCodeForAdmin(Long adminId, Integer type);
}
